<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <select id="mySelect">
        <option value=""></option>
        <option value="option1">选项1</option>
        <!-- <option value="option2">选项2</option>
        <option value="option3">选项3</option> -->
    </select>

    <script>
        const selectElement = document.getElementById('mySelect');

        selectElement.addEventListener('change', (event) => {
            const selectedOption = event.target.value;
            console.log(`选择了选项: ${selectedOption}`);
        });
    </script>
</body>
</html>